package com.xyy.saas.payment.job.syncData;

import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import com.xyy.elasticjob.client.annotation.ElasticJobConf;
import com.xyy.saas.payment.service.job.SyncFuminDataService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Date;

/**
 *
 * 查询富民报表
 * @author wangtianqi
 * @date 2019/11/13 19:39
 */
@ElasticJobConf(name = "xyy.elastic.job.manage.queryFuminRecords", cron = "0 0 1 * * ?")
public class QueryFuminRecordsJob implements SimpleJob {

    private static final Logger LOGGER = LoggerFactory.getLogger(QueryFuminRecordsJob.class);

    @Autowired
    private SyncFuminDataService syncFuminDataService;

    @Override
    public void execute(ShardingContext shardingContext) {
        LOGGER.info("QueryFuminRecordsJob#execute shardingInfo QueryFuminRecordsJob start.");
        syncFuminDataService.synchronizeLastDayFuminData();
        LOGGER.info("QueryFuminRecordsJob#execute shardingInfo QueryFuminRecordsJob end.");
    }
}
